package cn.t.service.sku;


import cn.t.core.mode.PageQueryDTO;
import cn.t.core.service.ServiceImpl;
import cn.t.model.sku.CustomerSkuDO;
import cn.t.repository.sku.CustomerSkuRepository;
import cn.t.request.CustomerSkuReq;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户商品映射表(CustomerSku)领域服务
 *
 * @author t
 * @since 2024-05-24 10:19:11
 */
@Slf4j
@Service
@AllArgsConstructor
public class CustomerSkuService extends ServiceImpl<CustomerSkuDO, CustomerSkuRepository> {

    public List<String> findSkuByCustomerCode(String customerSkuCode) {
        return repository.findSkuByCustomerCode(customerSkuCode);
    }

    public void addBatch(List<CustomerSkuDO> customerSkuDos) {
        repository.addBatch(customerSkuDos);
    }

    public List<CustomerSkuDO> page(PageQueryDTO<CustomerSkuReq> req, String field, String desc) {
        return repository.page(req, field, desc);
    }

    public Long queryCustomerSkuCount(CustomerSkuReq param) {
        return repository.queryCustomerSkuCount(param);
    }
}
